Saltar al contenido principal
PATCH
/
public
/
v1
/
campaign-service
/
campaigns
/
exclusive-listing
/
{campaign-id}
[BETA] Update exclusive listing campaign by ID.
curl --request PATCH \
  --url https://api.topsort.com/public/v1/campaign-service/campaigns/exclusive-listing/{campaign-id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Bola-Bola Ad campaign",
  "isActive": true,
  "startDate": "2023-11-07T05:31:56Z",
  "endDate": "2023-11-07T05:31:56Z",
  "exclusivityPrice": 123
}
'
{
  "name": "<string>",
  "marketplaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "campaignId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "exclusivityPrice": 123,
  "chargeType": "DAILY",
  "adFormat": "<string>",
  "vendorId": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "isActive": true,
  "externalCampaignId": "<string>",
  "isAutoTrigger": false,
  "startDate": "2023-11-07T05:31:56Z",
  "endDate": "2023-11-07T05:31:56Z",
  "bidType": "exclusive",
  "createdBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "position": 1,
  "walletId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Autorizaciones

Authorization
string
header
requerido

A valid API key generated in Topsort's UI.

Parámetros de ruta

campaign-id
string<uuid>
requerido

The ID of the campaign to be updated.

Cuerpo

application/json

The public request body for updating an exclusive listing campaign.

name
string | null

The name of the campaign.

Minimum string length: 1
Ejemplo:

"Bola-Bola Ad campaign"

isActive
boolean | null

Whether the campaign should be activated upon creation.The campaign will start when this is set and the start_date has passed.

startDate
string<date-time> | null

When should the campaign start. If the start date is in the past, it will be set to the current date.

endDate
string<date-time> | null

When should the campaign stop. Must be greater than start date.

exclusivityPrice
integer | null

The price to pay daily for the campaign to run.

Respuesta

Successful Response

Model that represents an Exclusive Listing Campaign.

name
string
requerido

The name of the campaign.

Minimum string length: 1
Ejemplo:

"Bola-Bola Ad campaign"

marketplaceId
string<uuid>
requerido

The ID of the marketplace.

campaignId
string<uuid>
requerido

The ID of the campaign.

exclusivityPrice
integer
requerido

The price to pay daily for the campaign to run.

chargeType
enum<string>
requerido

How exclusive campaigns are going to be charged, only daily is allowed.

Opciones disponibles:
DAILY
adFormat
string
requerido

The ad format of the campaign. Can be exclusive_listing.

Allowed value: "exclusive_listing"
Ejemplo:

"exclusive_listing"

vendorId
string
requerido

The marketplace's ID of the vendor.

createdAt
string<date-time>
requerido

When was this campaign created.

updatedAt
string<date-time>
requerido

When was this campaign last updated.

isActive
boolean
predeterminado:true

Whether the campaign should be activated upon creation.The campaign will start when this is set and the start_date has passed.

externalCampaignId
string | null

The external ID of the campaign in the marketplace.

isAutoTrigger
boolean
predeterminado:false

Whether the campaign is auto-triggered.

startDate
string<date-time>

Date when to start the campaign, specified in RFC 3339, if not set that campaign will start immediately after the campaign creation. Must include the Timezone definition.If the start date is in the past, it will be set to the current date.

endDate
string<date-time>

Date when to stop the campaign, specified in RFC 3339, if not set the campaign will never stop. This date must be greater than the start date and must be in the future. Must include the Timezone definition.

bidType
string
predeterminado:exclusive

The bidding type of the campaign.

Allowed value: "exclusive"
createdBy
string<uuid> | null

The ID of the user creating the campaign.

position
integer
predeterminado:1

The rank the ad will have in the auction

Rango requerido: 1 <= x <= 20
walletId
string<uuid> | null

The uuid of the wallet to be used with this campaign.